<template>
  <div class="user-index">
    <div class="user-com-title" style="font-weight: 700;font-size: 24px;margin: 10px 0;">{{$t('page.users.withdraw.title')}}</div>
    <div class="user-content">
      <el-table :data="tableData"
      style="width: 100%">
      <el-table-column :label="$t('page.users.withdraw.th_1')"  prop="id" width="60">
      </el-table-column>
      <el-table-column :label="$t('page.users.withdraw.th_2')"  prop="money" width="100">
      </el-table-column>
      <el-table-column :label="$t('page.users.withdraw.th_3')"  prop="bank_account" width="140">
      </el-table-column>
      <el-table-column :label="$t('page.users.withdraw.th_4')"  prop="bank_name" width="140">
      </el-table-column>
      <el-table-column :label="$t('page.users.withdraw.th_5')"  prop="bank_addr" width="180">
      </el-table-column>
      <el-table-column :label="$t('page.users.withdraw.th_6')"  prop="bank_address" width="100">
      </el-table-column>
      <el-table-column :label="$t('page.users.withdraw.th_7')"  prop="add_time" width="140">
        <template slot-scope="scope">
          {{ getTimeText(scope.row.add_time) }}
        </template>
      </el-table-column>
      <el-table-column :label="$t('page.users.withdraw.th_8')"  prop="status" width="80">
        <template slot-scope="scope">
          {{scope.row.status === -1 ? $t('page.users.withdraw.state1'): scope.row.status === 1 ? $t('page.users.withdraw.state2') :$t('page.users.withdraw.state3')}}
        </template>
      </el-table-column>
      <el-table-column :label="$t('page.users.withdraw.th_9')"  prop="reason" width="140">
      </el-table-column>
    </el-table>
    </div>
    
  </div>
</template>
<script>
import { timeStampToTime } from "@/utils/index"
export default {
  name: "withdrawRecord",
  data(){
    return {
      tableData:[],
      page:1,
      limit:10
    }
  },
  mounted() {
    this.getRecordList();
  },
  methods:{
    getRecordList(){
        this.$axios.get(`/api/user/extract/applylst`,{params:{page:this.page,limit:this.limit}}).then(res => {
            this.tableData = res.data.list;
        });
    },
    getTimeText(time){
      return timeStampToTime(time,'ymdhm')
    }

  }
}
</script>
<style scoped lang="scss">
  .user-index{
    .user-content{
      padding:4px 0;
    }
  }
</style>